package com.qf.web.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.web.entity.Member;

public interface MemberMapper extends BaseMapper<Member> {
    default Member selectMember(String username, String phone) {
        QueryWrapper<Member> qw = new QueryWrapper<>();
        qw.select(Member.COL_MEMBER_ID, Member.COL_USERNAME, Member.COL_PHONE)
                .eq(Member.COL_USERNAME, username).or().eq(Member.COL_PHONE, phone);
        return this.selectOne(qw);
    }
}